<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>form表单 | H5笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/html/tz.html" />
    
    
    <link rel="prev" href="../../md/html/iframe.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1.7"
        data-chapter-title="form表单"
        data-filepath="md/html/form.md"
        data-basepath="../.."
        data-revision="Tue Mar 13 2018 17:15:57 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/html.html">
            
                
                    <a href="../../md/html/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Html知识
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/table.html">
            
                
                    <a href="../../md/html/table.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/html/a.html">
            
                
                    <a href="../../md/html/a.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        a标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="md/html/anchor.html">
            
                
                    <a href="../../md/html/anchor.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.1.</b>
                        
                        a标签锚点
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="md/html/base.html">
            
                
                    <a href="../../md/html/base.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.2.</b>
                        
                        base标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="md/html/icon.html">
            
                
                    <a href="../../md/html/icon.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.3.</b>
                        
                        icon
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/html/img.html">
            
                
                    <a href="../../md/html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        图片
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="md/html/picture.html">
            
                
                    <a href="../../md/html/picture.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.1.</b>
                        
                        picture标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="md/html/hotmap.html">
            
                
                    <a href="../../md/html/hotmap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.2.</b>
                        
                        热区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="md/html/video.html">
            
                
                    <a href="../../md/html/video.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.3.</b>
                        
                        视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="md/html/audio.html">
            
                
                    <a href="../../md/html/audio.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.4.</b>
                        
                        音频
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="md/html/tabulation.html">
            
                
                    <a href="../../md/html/tabulation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        列表
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="md/html/ul.html">
            
                
                    <a href="../../md/html/ul.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.1.</b>
                        
                        无序列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="md/html/dl.html">
            
                
                    <a href="../../md/html/dl.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.2.</b>
                        
                        无序列表2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="md/html/ol.html">
            
                
                    <a href="../../md/html/ol.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.3.</b>
                        
                        有序列表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="md/html/sz.html">
            
                
                    <a href="../../md/html/sz.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="md/html/iframe.html">
            
                
                    <a href="../../md/html/iframe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        iframe标签
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.7" data-path="md/html/form.html">
            
                
                    <a href="../../md/html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="md/html/tz.html">
            
                
                    <a href="../../md/html/tz.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        拓展
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css.html">
            
                
                    <a href="../../md/css/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/ys.html">
            
                
                    <a href="../../md/css/ys.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/id-class.html">
            
                
                    <a href="../../md/css/id-class.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        id和class选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/css/relationship-selector.html">
            
                
                    <a href="../../md/css/relationship-selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/css/w.html">
            
                
                    <a href="../../md/css/w.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/css/attribute-selectors.html">
            
                
                    <a href="../../md/css/attribute-selectors.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="md/css/w2.html">
            
                
                    <a href="../../md/css/w2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        伪对象选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/css/font.html">
            
                
                    <a href="../../md/css/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        字体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/css/color.html">
            
                
                    <a href="../../md/css/color.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        元素颜色
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="md/css/text-shadow.html">
            
                
                    <a href="../../md/css/text-shadow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        文本阴影
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.1" data-path="md/css/textdecoration.html">
            
                
                    <a href="../../md/css/textdecoration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.1.</b>
                        
                        文本的线
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9.2" data-path="md/cs/vertical-align.html">
            
            <span><b>2.9.2.</b> 文本垂直对齐</span>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="md/css/box.html">
            
                
                    <a href="../../md/css/box.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        盒子
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="md/css/zhu.html">
            
                
                    <a href="../../md/css/zhu.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        行内元素和块级元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="md/css/float.html">
            
                
                    <a href="../../md/css/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.2.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="md/css/flex.html">
            
                
                    <a href="../../md/css/flex.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.3.</b>
                        
                        弹性盒子
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="md/css/location.html">
            
                
                    <a href="../../md/css/location.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="md/css/exercise.html">
            
                
                    <a href="../../md/css/exercise.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/gitbook/use.html">
            
                
                    <a href="../../md/gitbook/use.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        gitbook使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/scss/scss.html">
            
                
                    <a href="../../md/scss/scss.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        Sass使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/gulp/gulp.html">
            
                
                    <a href="../../md/gulp/gulp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Gulp
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="md/js.html">
            
            <span><b>6.</b> JS</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="md/js/js_date_obj.html">
            
                
                    <a href="../../md/js/js_date_obj.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        Date对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="md/js/理解对象.html">
            
                
                    <a href="../../md/js/理解对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        理解对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="md/js/事件.html">
            
                
                    <a href="../../md/js/事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="md/js/XMLHttpRequest对象.html">
            
                
                    <a href="../../md/js/XMLHttpRequest对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        AJAX
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >H5笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="form&#x8868;&#x5355;">form&#x8868;&#x5355;</h1>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>form</td>
<td>&#x8868;&#x5355;&#x6807;&#x7B7E;&#xFF0C;&#x53EF;&#x4EE5;&#x7406;&#x89E3;&#x4E3A;&#x4E00;&#x5F20;&#x95EE;&#x9898;&#x7EB8;&#xFF0C;&#x4E0A;&#x9762;&#x53EF;&#x4EE5;&#x8F93;&#x5165;&#x4EFB;&#x4F55;&#x95EE;&#x9898;&#x548C;&#x7B54;&#x6848;</td>
</tr>
<tr>
<td>action</td>
<td>&#x63A5;&#x6536;&#x5730;&#x5740;&#xFF0C;&#x901A;&#x5E38;&#x662F;&#x540E;&#x53F0;&#x4E00;&#x4E2A;&#x7A0B;&#x5E8F;&#x5904;&#x7406;&#x5730;&#x5740;&#xFF0C;&#x540E;&#x53F0;&#x8BED;&#x8A00;&#x6709;&#xFF08;php,java,.net,nodejs&#xFF09;,&#x4E0D;&#x586B;&#x5219;&#x9ED8;&#x8BA4;&#x63D0;&#x4EA4;&#x672C;&#x9875;&#x9762;</td>
</tr>
<tr>
<td>name</td>
<td>&#x8868;&#x5355;&#x7684;&#x540D;&#x5B57;&#xFF0C;&#x4E3B;&#x8981;&#x7528;&#x6765;&#x533A;&#x5206;&#x591A;&#x4E2A;&#x8868;&#x5355;</td>
</tr>
<tr>
<td>target</td>
<td>&#x8868;&#x5355;&#x63D0;&#x4EA4;&#x7684;&#x9875;&#x9762;&#x7684;&#x6253;&#x5F00;&#x65B9;&#x5F0F;&#xFF0C;<code>_self</code>,<code>_blank</code>&#x6216;&#x8005;&#x662F;&#x5177;&#x4F53;&#x7684;&#x7A97;&#x4F53;&#x540D;&#x5B57;(&#x4F8B;&#x5982;iframe&#x7684;&#x540D;&#x5B57;)</td>
</tr>
<tr>
<td>method</td>
<td>(get)&#x8F7B;&#x91CF;&#x7684;&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF0C;&#x4FE1;&#x606F;&#x91CF;&#x8F83;&#x5C11;&#xFF0C;&#x5B89;&#x5168;&#x8981;&#x6C42;&#x4E0D;&#x9AD8;&#xFF08;&#x6D4F;&#x89C8;&#x4EA7;&#x54C1;&#x9875;&#x9762;&#xFF0C;&#x6587;&#x7AE0;&#x9875;&#x9762;&#xFF0C;&#x8BBF;&#x95EE;&#x4E00;&#x4E9B;&#x54A8;&#x8BE2;&#x9875;&#x9762;&#xFF09;,&#x4FE1;&#x606F;&#x662F;&#x5B58;&#x653E;&#x5728;<code>url</code>&#x5730;&#x5740;&#x680F;&#x540E;&#x9762;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;&quot;171208HTML/login.php?usename=&#x6492;&amp;pw=dsd&quot;,(post)&#x8F83;&#x91CD;&#x7684;&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF0C;&#x4FE1;&#x606F;&#x91CF;&#x8F83;&#x5927;&#xFF0C;&#x5B89;&#x5168;&#x8981;&#x6C42;&#x76F8;&#x5BF9;&#x8F83;&#x9AD8;&#xFF0C;&#x4F8B;&#xFF08;&#x4E0A;&#x4F20;&#x6587;&#x4EF6;&#xFF0C;&#x4E0A;&#x4F20;&#x6587;&#x7AE0;&#xFF0C;&#x7F51;&#x7AD9;&#x767B;&#x5F55;&#xFF0C;&#x9A8C;&#x8BC1;&#x7B49;&#xFF09;</td>
</tr>
</tbody>
</table>
<p>&#x53C2;&#x7167;&#x4EE3;&#x7801;&#xFF1A;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span> <span class="hljs-attribute">action</span>=<span class="hljs-value">&quot;login.php&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;login&quot;</span> <span class="hljs-attribute">method</span>=<span class="hljs-value">&quot;post&quot;</span>&gt;</span>
            &#x7528;&#x6237;&#x540D;&#xFF1A;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;usename&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&quot;</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
            &#x5BC6;&#x7801;: <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;password&quot;</span>  <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;pw&quot;</span>/&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
                <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;submit&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<h3 id="&#x62FE;&#x8272;&#x5668;">&#x62FE;&#x8272;&#x5668;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>color</td>
<td>&#x62FE;&#x8272;&#x5668;</td>
</tr>
</tbody>
</table>
<p>&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE&#x548C;Safar&#x4E0D;&#x652F;&#x6301;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;color&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;color&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<p>&#x5B9E;&#x4F8B;</p>
<form>
    <input type="color" name="color">
</form>

<h3 id="&#x65F6;&#x95F4;&#x9009;&#x62E9;&#x5668;">&#x65F6;&#x95F4;&#x9009;&#x62E9;&#x5668;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>datetime-local</td>
<td>&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x5E74;&#x6708;&#x65E5;&#x65F6;&#x5206;</td>
</tr>
<tr>
<td>date</td>
<td>&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x5E74;&#x6708;&#x65E5;</td>
</tr>
<tr>
<td>month</td>
<td>&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x5E74;&#x6708;</td>
</tr>
<tr>
<td>week</td>
<td>&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x5E74;&#x548C;&#x7B2C;&#x51E0;&#x5468;</td>
</tr>
<tr>
<td>time</td>
<td>&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x65F6;&#x5206;</td>
</tr>
</tbody>
</table>
<p>&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE&#x548C;Safar&#x4E0D;&#x652F;&#x6301;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;datetime-local&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;datetime-local&quot;</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;date&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;date&quot;</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;month&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;menth&quot;</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;week&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;week&quot;</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;time&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;time&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<p>&#x5B9E;&#x4F8B;</p>
<form>
    <input type="datetime-local" name="datetime-local"><br>
    <input type="date" name="date"><br>
    <input type="month" name="menth"><br>
    <input type="week" name="week"><br>
    <input type="time" name="time">
</form>

<h3 id="&#x641C;&#x7D22;&#x6846;">&#x641C;&#x7D22;&#x6846;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>search</td>
<td>&#x641C;&#x7D22;&#x6846;&#xFF0C;&#x4E3B;&#x8981;&#x589E;&#x52A0;&#x4E86;&#x4E00;&#x4E2A;&#x5FEB;&#x901F;&#x6E05;&#x9664;&#x5185;&#x5BB9;&#x7684;&#x529F;&#x80FD;</td>
</tr>
</tbody>
</table>
<p>&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE10+&#x4EE5;&#x4E0A;&#x6D4F;&#x89C8;&#x5668;&#x652F;&#x6301;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;search&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<p>&#x5B9E;&#x4F8B;</p>
<form>
    <input type="search">
</form>

<h3 id="&#x7535;&#x8BDD;&#x8F93;&#x5165;&#x6846;">&#x7535;&#x8BDD;&#x8F93;&#x5165;&#x6846;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>tel</td>
<td>&#x4E3B;&#x8981;&#x901A;&#x8FC7;&#x642D;&#x914D;<code>pattern</code>&#x5C5E;&#x6027;&#x6765;&#x68C0;&#x6D4B;&#x6B63;&#x786E;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;</td>
</tr>
<tr>
<td>pattern</td>
<td>&#x68C0;&#x6D4B;&#x89C4;&#x5219;&#xFF0C;&#x901A;&#x5E38;&#x7528;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x6765;&#x8868;&#x793A;</td>
</tr>
<tr>
<td>required</td>
<td>&#x63D0;&#x793A;<em>&#x5FC5;&#x987B;&#x586B;</em>&#x7684;&#x610F;&#x601D;</td>
</tr>
</tbody>
</table>
<p><em>&#x8FD9;&#x91CC;&#x6D89;&#x53CA;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;</em></p>
<p>&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE10+&#x4EE5;&#x4E0A;&#x6D4F;&#x89C8;&#x5668;&#x652F;&#x6301;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;tel&quot;</span> <span class="hljs-attribute">pattern</span>=<span class="hljs-value">&quot;1[0-9]{10}&quot;</span> <span class="hljs-attribute">required</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<p>&#x5B9E;&#x4F8B;</p>
<form>
    <input type="tel" pattern="1[0-9]{10}" required>
</form>

<h3 id="&#x6570;&#x5B57;&#x8303;&#x56F4;&#x9009;&#x62E9;&#x5668;">&#x6570;&#x5B57;&#x8303;&#x56F4;&#x9009;&#x62E9;&#x5668;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>range</td>
<td>&#x6570;&#x5B57;&#x8303;&#x56F4;&#x9009;&#x62E9;&#x5668;</td>
</tr>
<tr>
<td>min</td>
<td>&#x6700;&#x5C0F;&#x503C;</td>
</tr>
<tr>
<td>max</td>
<td>&#x6700;&#x5927;&#x503C;</td>
</tr>
<tr>
<td>step</td>
<td>&#x6BCF;&#x6B21;&#x6539;&#x52A8;&#x7684;&#x6B65;&#x4F10;&#x5927;&#x5C0F;</td>
</tr>
</tbody>
</table>
<p>&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE10+&#x4EE5;&#x4E0A;&#x6D4F;&#x89C8;&#x5668;&#x652F;&#x6301;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">form</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;range&quot;</span> <span class="hljs-attribute">min</span>=<span class="hljs-value">&quot;0&quot;</span> <span class="hljs-attribute">max</span>=<span class="hljs-value">&quot;100&quot;</span> <span class="hljs-attribute">step</span>=<span class="hljs-value">&quot;5&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;0&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">form</span>&gt;</span>
</code></pre>
<p>&#x5B9E;&#x4F8B;</p>
<form>
    <input type="range" min="0" max="100" step="5" value="0">
</form>

<p>&#x66F4;&#x591A;input&#x6807;&#x7B7E;&#x8BE6;&#x60C5;&#x4E86;&#x89E3;&#xFF1A;<a href="https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input" target="_blank">&#x8BF7;&#x70B9;&#x51FB;</a></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/html/iframe.html" class="navigation navigation-prev " aria-label="Previous page: iframe标签"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/html/tz.html" class="navigation navigation-next " aria-label="Next page: 拓展"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters":{},"redirect":{},"splitter":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
